perm filename 106PRJ[1,RWF]1 blob sn#730329 filedate 1983-11-11 generic text, type C, neo UTF8
COMMENT āŠ—   VALID 00002 PAGES
C REC  PAGE   DESCRIPTION
C00001 00001
C00002 00002	A Final Project
C00009 ENDMK
CāŠ—;
A Final Project

			Western Movies

Your problem is to construct and run a program which writes scenarios (outlines
of the action) for western-style movies.  The western film is a ritual art form,
with detailed conventions for behavior.  Here is a sample:

	Sheriff rides out of town.
	Bad Guy rides into town.
	Bad Guy robs bank.
	Bad Guy rides out of town.
	Fadeout. Time passes.

	Good Guy rides into town.
	Bad Guy walks into saloon.
	Bad Guy drinks.
	Good Guy walks into saloon.
	Good Guy drinks.
	Bad Guy drinks.
	Bad Guy drinks.
	Bad Guy hits Good Guy.
	Good Guy hits Bad Guy.
	Good Guy knocks Bad Guy down.
	Fadeout.  Time passes.

	Good Guy rides into town.
	Bad Guy walks out of saloon.
	Bad Guy shoots.
	Bad Guy kills Good Guy's friend.
	Good Guy shoots.
	Good Guy kills Bad Guy.
	Good Guy rides out of town.
	The End.

In your scenario, you may draw upon the following cast of characters:

	Sheriff
	Good Guy
	Bad Guy
	Good Guy's friends	(As many as desired)
	Bad Guy's friends	(As many as desired)
	Bystanders		(As many as desired)
	(Others as desired)

The following actions or types of action are sufficient to construct interesting
scenarios, although one could expand the list if he/she chose:

	X rides (into/out of) town.
	X walks (into/out of) saloon.
	X drinks.
	Bad Guy (robs bank/steals cattle).
	Sheriff (arrests/releases) X.
	X hits Y.
	X knocks Y down.
	X shoots.
	X kills Y.
	Bystanders run for cover.
	Fadeout. Time passes.
	The End.
	(Others as desired).

In the name of consistency, you should observe some of the basic rules about place,
time, etc.  Each character can only be in one place at a time, say one of the
following:

	in street
	out of town
	saloon
	jail
	dead
	not yet known	
	(others)

In addition, there are some important aesthetic conditions:

	Fistfights occur only in saloon.
	Gunfights only in the street.
	Good Guy never strikes or shoots first.
	Three drinks and you're drunk.
	Drunks can't knock anyone down.
	Drunks can't shoot straight.
	The Bad Guy loses in the end.
	Your friends are always around when you need them.
	(Others)

Also, some essential logical conditions:

	You can't kill (or hit or arrest) someone who isn't there.
	Dead men can't do anything.
	You can't arrest someone unless there has been a crime.
	etc.

Requirements:

Your program should produce at least three scenarios of reasonable size.  The
scenarios should make logical sense, i.e. don't have X kill Y and then have
Y ride out of town.  Turn in your program listing and the printout of three
scenarios.  Style and documentation, as well as correctness, will (as always)
be criteria for grading.

Hints:

You will want to use random numbers in order to choose between possible actions.
To do this use the Pascal function _random_.  _random(x)_ returns a real number
which has a random value between 0 and 1.  The procedure call _SetRan(seed)_ gives
the _random_ function an initial seed to use in generating the random numbers
(this is so you won't always get the same sequence).  If a particular event has
a probability _p_ of occuring then use:

	U:=Random(x);
	If U>p then Event; (*the event occurs*)

Bells and Whistles

If this isn't already hard enough for you, here are some suggestions about
possible features to add:  Allow for more than one Good (Bad) Guy each having
different names, you could even say perhaps that Bad Guy Joe really hates
Bad Guy Greene, etc; Let places have unique names, i.e., ``Last Chance Saloon,''
``The Dutch Goose Saloon,'' etc.  Then rather than ``X walks into Saloon'' you
would say ``X walks into the Dutch Goose.''  Good Guy and Bad Guy would of course
have to be in the _same_ saloon then in order to get into a fight.  You could add
subplots (romances, humor, etc.), other locations (a deep canyon into which the
Bad Guy falls), other people (farmer's daughter, female gunfighters, drunks,
doctors, computer programmers), other types of actions...there are many other
features you could add, so let your imagination be your guide.

References:

``Shane,'' ``The Man Who Shot Liberty Valence,'' ``High Noon,'' ``The Gunfighter,''
``Destry Rides Again,'' ``Red River,'' ``Stagecoach,'' all movies with Roy Rogers,
Gene Autrey, Lash Larue, Tom Mix....